import { Node } from "cc";
import { ecs } from "db://app-game/libs/ecs/ECS";

/** 巡逻模式 */
export enum PatrolModeType {
  /** 随机 */
  Random = "Random",
}

/** 巡逻组件 */
@ecs.register("PatrolModel")
export class PatrolModelComp extends ecs.Comp {
  /** 移动节点 */
  node: Node = null!;
  /** 巡逻模式 */
  mode = PatrolModeType.Random;
  /** 偏移距离 */
  offset: number = 10;

  reset(entity: ecs.Entity): void {
    this.node = null!;
    this.mode = PatrolModeType.Random;
    this.offset = 10;
  }
}
